<?php
    $movies=new movie();
    echo '<table>';
    foreach($movies->fetch(0, 20) as $record){
    echo '<tr><td>'.$record['id'].'</td><td>'.$record['name'].'</td><td>';
    foreach($movies->person->fetch(0,20,$record['id']) as $person){
        echo $person['name'];
    }
    echo '</td><td>';
    echo '</td></tr>';

    }
    echo '</table>';
?>
